package com.sxhalo.fsms.domain;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author 
 * 设备变频器运行数据
 */
public class DeviceElectricRunningData extends DeviceElectricRunningDataKey implements Serializable {
    /**
     * 组合有功总电能kWh
     */
    private BigDecimal composeTotalActiveEnergy;

    /**
     * 正向有功总电能
     */
    private BigDecimal forwardTotalActiveEnergy;

    /**
     * 反向有功总电能
     */
    private BigDecimal reverseTotalActiveEnergy;

    private static final long serialVersionUID = 1L;

    public BigDecimal getComposeTotalActiveEnergy() {
        return composeTotalActiveEnergy;
    }

    public void setComposeTotalActiveEnergy(BigDecimal composeTotalActiveEnergy) {
        this.composeTotalActiveEnergy = composeTotalActiveEnergy;
    }

    public BigDecimal getForwardTotalActiveEnergy() {
        return forwardTotalActiveEnergy;
    }

    public void setForwardTotalActiveEnergy(BigDecimal forwardTotalActiveEnergy) {
        this.forwardTotalActiveEnergy = forwardTotalActiveEnergy;
    }

    public BigDecimal getReverseTotalActiveEnergy() {
        return reverseTotalActiveEnergy;
    }

    public void setReverseTotalActiveEnergy(BigDecimal reverseTotalActiveEnergy) {
        this.reverseTotalActiveEnergy = reverseTotalActiveEnergy;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceElectricRunningData other = (DeviceElectricRunningData) that;
        return (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getAcquisitionTime() == null ? other.getAcquisitionTime() == null : this.getAcquisitionTime().equals(other.getAcquisitionTime()))
            && (this.getComposeTotalActiveEnergy() == null ? other.getComposeTotalActiveEnergy() == null : this.getComposeTotalActiveEnergy().equals(other.getComposeTotalActiveEnergy()))
            && (this.getForwardTotalActiveEnergy() == null ? other.getForwardTotalActiveEnergy() == null : this.getForwardTotalActiveEnergy().equals(other.getForwardTotalActiveEnergy()))
            && (this.getReverseTotalActiveEnergy() == null ? other.getReverseTotalActiveEnergy() == null : this.getReverseTotalActiveEnergy().equals(other.getReverseTotalActiveEnergy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getAcquisitionTime() == null) ? 0 : getAcquisitionTime().hashCode());
        result = prime * result + ((getComposeTotalActiveEnergy() == null) ? 0 : getComposeTotalActiveEnergy().hashCode());
        result = prime * result + ((getForwardTotalActiveEnergy() == null) ? 0 : getForwardTotalActiveEnergy().hashCode());
        result = prime * result + ((getReverseTotalActiveEnergy() == null) ? 0 : getReverseTotalActiveEnergy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", composeTotalActiveEnergy=").append(composeTotalActiveEnergy);
        sb.append(", forwardTotalActiveEnergy=").append(forwardTotalActiveEnergy);
        sb.append(", reverseTotalActiveEnergy=").append(reverseTotalActiveEnergy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}